package com.atguigu.gmall.feign.order;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.model.order.OrderInfo;
import com.atguigu.gmall.model.vo.order.CartItemForOrderVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient("service-order")
@RequestMapping("/rpc/inner/order")
public interface OrderFeignClient {

    @GetMapping("/confirm")
    public Result<Map<String,Object>> getCartConfirmList();

    @GetMapping("/amount")
    public Result<OrderInfo> getOrderInfoById(@RequestParam("orderId") Long orderId);

    @GetMapping("/checkstatus/{outTradeNo}")
    public Result checkOrderStatus(@PathVariable("outTradeNo")String outTradeNo);
}
